GDK-Win32: Fixup, and cleanup WGL HDC handling
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 19 Jul 2021 02:32:28 +0000 (10:32 +0800)
committerBenjamin Otte <otte@redhat.com>
Thu, 22 Jul 2021 14:28:16 +0000 (16:28 +0200)
commit8648486400949ab088da642a6a7ee6523ca76157
tree43d678d3a16202c7bf43322e0d3579bb9209feed
parent6c001171197c58081516b9cb66801712afc14be6
GDK-Win32: Fixup, and cleanup WGL HDC handling

It turns out that the problem of the WGL window not drawing was due to
the fact that I messed up where I placed SwapBuffers() during the
conversion... doh:|

At the same time, stop storing the HDC in the GdkWin32GLContextWGL, but
instead always create it along the surface we created, so that it is ready
for use for operating with WGL when we are not dealing with "surfaceless"
contexts.  If we are dealing with "surfaceless" contexts, just use the
HDC of the dummy window that we created when we created the
Gdk(Win32)Display.

WGL contexts should now be in working order at this point.
gdk/win32/gdkglcontext-win32-wgl.c
gdk/win32/gdksurface-win32.c